<div class="timesheets index">
	<h2><?php echo __('Timesheets'); ?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<!--<th><?php echo $this->Paginator->sort('ID'); ?></th>-->
			<th><?php echo $this->Paginator->sort('User_ID'); ?></th>
			<th><?php echo $this->Paginator->sort('name'); ?></th>
			<th><?php echo $this->Paginator->sort('date'); ?></th>
			<th><?php echo $this->Paginator->sort('start_time'); ?></th>
			<th><?php echo $this->Paginator->sort('end_time'); ?></th>
			<th><?php echo $this->Paginator->sort('total_no_hrs'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($timesheets as $timesheet): ?>
	<tr>
		<!--<td><?php echo h($timesheet['Timesheet']['id']); ?>&nbsp;</td>-->
		<td>
			<?php echo $this->Html->link($timesheet['User']['user_id'], array('controller' => 'users', 'action' => 'view', $timesheet['User']['id'])); ?>
		</td>
		<td><?php echo h($timesheet['Timesheet']['name']); ?>&nbsp;</td>
		<td><?php echo h($timesheet['Timesheet']['date']); ?>&nbsp;</td>
		<td><?php echo h($timesheet['Timesheet']['start_time']); ?>&nbsp;</td>
		<td><?php echo h($timesheet['Timesheet']['end_time']); ?>&nbsp;</td>
		<td><?php echo h($timesheet['Timesheet']['total_no_hrs']); ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View'), array('action' => 'view', $timesheet['Timesheet']['id'])); ?>
			<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $timesheet['Timesheet']['id'])); ?>
			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $timesheet['Timesheet']['id']), null, __('Are you sure you want to delete '.$timesheet['Timesheet']['name'].' ?')); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>

	<p>

                	<?php
                		echo "<p>";
                		$urlAdd = array('controller' => '/Timesheets/','action' => 'add');
                        echo $this->Form->button('Add New Timesheet', array('onclick' => "location.href='".$this->Html->url($urlAdd)."'"));
                    ?>
        	<p>

	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>

                            		<li><?php echo $this->Html->link(__('Staff Users'), array('controller' => 'Users','action' => 'index')); ?></li>
                            		<li><?php echo $this->Html->link(__('Departments'), array('controller' => 'departments', 'action' => 'index')); ?> </li>
                            		<li><?php echo $this->Html->link(__('Contacts'), array('controller' => 'contacts', 'action' => 'index')); ?> </li>
                            		<li><?php echo $this->Html->link(__('Lists'), array('controller' => 'mail_lists', 'action' => 'index')); ?> </li>
                            		<li><?php echo $this->Html->link(__('Timesheets'), array('controller' => 'timesheets', 'action' => 'index')); ?> </li>
                            		<li><?php echo $this->Html->link(__('Notes'), array('controller' => 'notes', 'action' => 'index')); ?> </li>
                            	</ul>
</div>
